import { alovaInstance as alova } from './alova'
import type { UserInfo } from '@/types'

export function getData() {
  return alova.Get('https://jsonplaceholder.typicode.com/todos/1', {
    transformData(data) {
      return data
    },
  })
}

// 登录接口
interface LoginData {
  phone: string
}
export function login(data: LoginData) {
  return alova.Post<{
    Data: UserInfo
  }>('/user/login', { ...data })
}
